Skip to content

Remove pyre-fixme/pyre-ignore from ax/storage/ source files#4988

Closed
saitcakmak wants to merge 1 commit into
facebook:mainfrom
saitcakmak:export-D95264795
Closed

Remove pyre-fixme/pyre-ignore from ax/storage/ source files#4988
saitcakmak wants to merge 1 commit into
facebook:mainfrom
saitcakmak:export-D95264795

Conversation

@saitcakmak
Copy link
Copy Markdown
Contributor

Summary:
Remove ~124 pyre-fixme/pyre-ignore suppression comments from 22 source files
in ax/storage/ by applying proper type fixes:

  • Use cast(type[SQAClass], ...) for SQA class lookups from config dicts
  • Use cast(type[Enum], enum) for enum value/name access
  • Change bare type to type[Any] in registry function signatures
  • Use assert_is_instance() for JSON dict key narrowing
  • Add proper type annotations for Generator return types
  • Use none_throws() for generation strategy ID access
  • Fix SQLAlchemy TypeDecorator parameter types

Remaining pyre errors are pre-existing SQLAlchemy/BoTorch stub mismatches
that cannot be fixed without changing library type stubs.

Differential Revision: D95264795

Summary:
Remove ~124 pyre-fixme/pyre-ignore suppression comments from 22 source files
in ax/storage/ by applying proper type fixes:

- Use `cast(type[SQAClass], ...)` for SQA class lookups from config dicts
- Use `cast(type[Enum], enum)` for enum value/name access
- Change bare `type` to `type[Any]` in registry function signatures
- Use `assert_is_instance()` for JSON dict key narrowing
- Add proper type annotations for Generator return types
- Use `none_throws()` for generation strategy ID access
- Fix SQLAlchemy TypeDecorator parameter types

Remaining pyre errors are pre-existing SQLAlchemy/BoTorch stub mismatches
that cannot be fixed without changing library type stubs.

Differential Revision: D95264795
@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 6, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 6, 2026

@saitcakmak has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95264795.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.83%. Comparing base (9f50a93) to head (37af830).

Files with missing lines Patch % Lines
ax/storage/json_store/encoders.py 80.00% 1 Missing ⚠️
ax/storage/sqa_store/load.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4988   +/-   ##
=======================================
  Coverage   96.83%   96.83%           
=======================================
  Files         599      599           
  Lines       64584    64594   +10     
=======================================
+ Hits        62540    62550   +10     
  Misses       2044     2044           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 6, 2026

This pull request has been merged in 6560861.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants